import 'package:flutter/material.dart';
import 'package:flutter_layout/main/notfound_view_page.dart';
import 'package:flutter_layout/pages/login/login_view.dart';
import 'package:get/get.dart';

class MyController extends GetxController {
  final count = 0.obs;

  // @override
  // void onInit() {
  //   super.onInit();
  // }

  @override
  void onReady() {}

  @override
  void onClose() {}

  increment() => count.value++;

  Route? onGenerateRoute(RouteSettings settings) {
    if (settings.name == '/login') {
      return GetPageRoute(
        settings: settings,
        page: () => LoginPage(),
        transition: Transition.topLevel,
      );
    } else if (settings.name == '/nofound') {
      return GetPageRoute(
        settings: settings,
        page: () => const NotfoundView(),
        transition: Transition.fadeIn,
      );
    }
    return null;
  }
}
